#ifndef T_GLOBAL_H
#define T_GLOBAL_H

#include <QtCore>

#define T_DECLARE_PRIVATE(Class) \
class Class##Private *d_ptr; \
    Q_DECLARE_PRIVATE(Class)

#define T_DECLARE_PUBLIC(Class) \
    class Class *q_ptr; \
    Q_DECLARE_PUBLIC(Class)

#define T_INIT_QPTR(X) QObject(X), q_ptr(X)
#define T_INIT_DPTR(Class) d_ptr = new Class##Private

#ifdef __GNUC__
#    define T_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y)
#else
#    define T_GCC_VERSION_AT_LEAST(x,y) 0
#endif

#ifndef T_DEPRECATED
#if T_GCC_VERSION_AT_LEAST(3,1)
#    define T_DEPRECATED __attribute__((deprecated))
#else
#    define T_DEPRECATED
#endif
#endif


#endif // T_GLOBAL_H
